﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Love.Awesome.Utils
{
    public static class ImageHelper
    {
        ///<summary>从字节流中创建图片</summary>
        public static Image GetImageFromBytes(byte[] bytes)
        {
            FileData fileData = Love.FileSystem.NewFileData(bytes, string.Empty);
            ImageData data = Love.Image.NewImageData(fileData);
            return Love.Graphics.NewImage(data);
        }
    }
}
